var PaginatedTools = {callbackFun:"", nowPage:1, setCallBackFun:function (callbackFun) {
	var self = this;
	self.callbackFun = callbackFun;
}, prePage:function (nowPage) {
	var self = this;
	self.nowPage = parseInt(nowPage);
	if (nowPage <= 0) {
		self.nowPage = 1;
	} else {
		if (nowPage == 1) {
			self.nowPage = 1;
		} else {
			self.nowPage = parseInt(nowPage) - 1;
		}
	}
	self.jumpToPage();
}, nextPage:function (nowPage, pageCnt) {
	var self = this;
	self.nowPage = parseInt(nowPage);
	if (nowPage <= 0) {
		self.nowPage = 1;
	} else {
		if (nowPage >= pageCnt) {
			self.nowPage = pageCnt;
		} else {
			self.nowPage = parseInt(nowPage) + 1;
		}
	}
	self.jumpToPage();
}, jumpPage:function (jumpPage, nowPage, pageCnt) {
	var self = this;
	if (jumpPage <= 0) {
		jumpPage = 1;
	} else {
		if (jumpPage > pageCnt) {
			jumpPage = pageCnt;
		}
	}
	self.nowPage = (jumpPage);
	self.jumpToPage();
}, jumpWithIdElem:function (id, nowPage, pageCnt) {
	var self = this;
	self.jumpPage(document.getElementById(id).value,nowPage,pageCnt);
}, lastPage:function (nowPage, pageCnt) {
	var self = this;
	self.nowPage = (pageCnt);
	self.jumpToPage();
}, firstPage:function (nowPage, pageCnt) {
	var self = this;
	self.nowPage = 1;
	self.jumpToPage();
}, jumpToPage:function () {
	var self = this;
	this.callbackFun(self.nowPage);
}};